﻿using Microsoft.Extensions.DependencyInjection;
using MyVideoPlayer.Services.DI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyVideoPlayer.Services
{
    /// <summary>
    /// 添加服务
    /// </summary>
    public static class ServiceCollectionExtensions
    {
        /// <summary>
        /// 添加服务
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddServices(this IServiceCollection services)
        {
            // 注册文件打开对话框服务
            services.AddSingleton<IOpenFileDialogService, OpenFileDialogService>();
            services.AddSingleton<IDispatcherService, DispatcherService>();


            return services;
        }
    }
}
